Skip to content

Conversation

joeleonjr
Copy link
Contributor

Description:

Some users new to adding the TH pre-commit hook want to test the hook without enforcement (meaning the commit won't be blocked by the presence of a secret). This PreCommit.md update instructs users to: (1) remove the --fail flag, (2) pipe stderr to /dev/null so that the non-secret details aren't outputted to console. This effectively means the pre-commit hook will always pass, but any verified or unknown secrets will be outputted to console.

I verified this works with global built-in git hooks, the pre-commit framework and husky.

The alternative would be to add an --audit flag to the CLI. While a simple change, I think providing instructions on how to use the existing flags is sufficient given the user base for this feature isn't particularly huge.

@joeleonjr joeleonjr requested a review from a team as a code owner June 30, 2025 14:22
@zricethezav zricethezav merged commit c1fd84c into trufflesecurity:main Aug 14, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants